package cn.edu.scau.cmil.luochenghao.comprehensive;
import java.io.*;

public class Output {
	public static boolean output(String[][] student) {//返回boolean判断输出是否成功
		try{
			FileWriter out=new FileWriter("Data.txt");
			for(int i=0;student[i][0]!=null;i++) {//按学号、姓名、课程、教师、班级、考勤、测验、作业、期末、总评的顺序把数组中的内容输入到文件Data.txt中
				out.write(student[i][0].toString()+" "+student[i][1].toString()+" "+student[i][7].toString()+" "+student[i][8].toString()+
						" "+student[i][9].toString()+" "+student[i][2].toString()+" "+student[i][3].toString()+" "+student[i][4].toString()
						+" "+student[i][5].toString()+" "+student[i][6].toString()+"\n");//最后+\n换行
			}
			out.close();
			return true;
		}
		catch(IOException e) {
			System.out.println("Error"+e);
			return false;
		}
	}
}
